//
//  AppDelegate.swift
//  AICleaner
//
//  Created by firefly on 2025/1/25.
//

import UIKit


// 推送通知、深度链接和第三方SDK初始化。
class AppDelegate: NSObject, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        // 初始化第三方SDK或处理启动逻辑
        print("App did finish launching")
        return true
    }
    
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        // 处理推送通知注册
        print("Device token: \(deviceToken)")
    }
    
    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
        // 处理推送通知
        print("Received remote notification: \(userInfo)")
        completionHandler(.newData)
    }
}
